package sql.db;

import java.io.Serializable;


public class Column implements Serializable 
{
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String name = null;
	private DataType d_type = null;
	private boolean not_null = false;
	
	public Column() {
		super();
		name = null;
		d_type = null;
		not_null = false;
	}
	
	public Column(String name, DataType d_type, boolean not_null, boolean is_primary, boolean is_foreign) {
		super();
		this.name = name;
		this.d_type = d_type;
		this.not_null = not_null;
	}
	
	
	public String toString() {
		String str;
		str = String.format("%-20s%-15s%-8s", name, d_type.toString(), (not_null ? "N" : "Y"));
		return str;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public DataType getD_type() {
		return d_type;
	}

	public void setD_type(DataType d_type) {
		this.d_type = d_type;
	}

	public boolean isNot_null() {
		return not_null;
	}

	public void setNot_null(boolean not_null) {
		this.not_null = not_null;
	}
}
